<%@ Import Namespace="System.Data.SqlClient" %>

<script language="VB" runat="server">

  Sub Page_Load(Sender As Object, E As EventArgs)
  
    Dim con As New SqlConnection("Data Source=.; Initial Catalog=pubs; UID=sa; PWD=aido")
    Dim cmd As SqlCommand
    
    con.Open()
    cmd = New SqlCommand("select * from authors", con)
    
    DataGrid1.DataSource = cmd.ExecuteReader()
    DataGrid1.DataBind()
  
  End Sub
  
</script>


<asp:DataGrid id="DataGrid1" runat="server"/>